package cn.getech.data.development.mapper.flink;

import cn.getech.data.development.entity.flink.BdpRealTableInfo;
import cn.getech.data.development.model.req.search.DataSearchReq;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface BdpRealTableInfoMapper extends BaseMapper<BdpRealTableInfo> {
    int insertOrUpdateSelective(BdpRealTableInfo record);

    int insertAndId(BdpRealTableInfo record);

    IPage<BdpRealTableInfo> selectListPage(IPage<BdpRealTableInfo> dataPage, @Param("params") DataSearchReq params);

    IPage<BdpRealTableInfo> selectRealApplyPage(Page<BdpRealTableInfo> page,@Param("params") Map<String, Object> params);

    BdpRealTableInfo getTableById(@Param("tableId") Integer tableId);


    IPage<BdpRealTableInfo> listPageByRole(IPage<BdpRealTableInfo> dataPage,  @Param("params") Map<String, Object> params);

    IPage<BdpRealTableInfo> listPageByTenant(IPage<BdpRealTableInfo> dataPage,  @Param("params") Map<String, Object> params);

    void delById(Integer id);

    List<Integer> applyUserList(@Param("userId") Integer userId, @Param("tableType") Integer tableType);

    List<Integer> createUserList(@Param("statusList") List<Integer> statusList, @Param("params") Map<String, Object> params);

    Integer checkProjectRelation(@Param("tableId") Integer id);

    List<Integer> selectTableIds(@Param("id") Integer id);

    Integer deleteCategory(@Param("tableId")Integer tableId);

    Integer insertRelation(@Param("param")  Map<String, Object> param);

}